package ACMProble;


import java.io.BufferedInputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Pro2034 {
	public static void main(String[] args){
		Scanner in = new Scanner(new BufferedInputStream(System.in));
		while(in.hasNext()){
			int n = in.nextInt();
			int m = in.nextInt();
			if(n == 0 && m == 0){
				break;
			}
			int[] num = new int[n+m];
			for(int i=0;i<m+n;i++){
				num[i] = in.nextInt();
			}
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int i=0;i<n;i++){
				boolean flag = true;
				for(int j=n;j<n+m;j++){
					if(num[i] == num[j])
						flag = false;
				}
				if(flag){
					list.add(num[i]);
				}
			}
			Collections.sort(list);
			if(list.isEmpty()){
				System.out.println("NULL");
			}else{
				for (Integer integer : list) {
					System.out.print(integer+" ");
				}
			System.out.println();
			}
		}
		in.close();
	}
}
